package com.example.javamaday.map;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

public class HashMapTest {
    public static void main(String[] args) {
        Map<String, String> hashMap = new LinkedHashMap<>();
        hashMap.put("key0", "value0");
        hashMap.put("key1", "value1");
        hashMap.put("key2", "value2");
        Set<Map.Entry<String, String>> set = hashMap.entrySet();
        for (Map.Entry entry : set) {
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
            System.out.println("key:" + key + ",value:" + value);
        }
    }
}
